/*版本1，不适用es2015语法*/
// var path=require("path")
// var map=require("lodash/map");
// var square=function(n){
// 	return n*n
// }
// console.log(map([1,2,3,4,5,10], square));
/*版本一结束*/

/*版本2*/

// import { map } from 'lodash';

// console.log(map([1,2,3,4,5,6], n => n*n));


/*版本3 使用模板*/
import { map } from 'lodash';
import template from './numberlist.hbs';

let numbers = map([1,2,3,4,5,6], n => n*n);


// setTimeout( () => {
//     require(['./numberlist.hbs'], template => {
//         document.getElementById("app-container").innerHTML = template({numbers});
//     })
// }, 2000);
window.onload=function(){

document.getElementById("app-container").innerHTML = template({numbers});
}
document.getElementById("app-container").innerHTML="<div>test</div>";
console.log(template({numbers}));
console.log(typeof template({numbers}))